﻿Public Class StartUpChooser

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If CheckBox1.Checked = True Then
            My.Settings.TabsEnabledDefault = "Without Tabs"
            My.Settings.Save()
        End If
        If My.Settings.SplashScreenEnabled = "False" Then
            BrowserWithoutTabs1.Show()
            Me.Close()
            Exit Sub
        ElseIf My.Settings.SplashScreenEnabled = "True" Then
            SplashScreen.Show()
            Me.Close()
            Exit Sub
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If CheckBox1.Checked = True Then
            My.Settings.TabsEnabledDefault = "With Tabs"
            My.Settings.Save()
        End If
        If My.Settings.SplashScreenEnabled = "False" Then
            BrowserWithoutTabs.Show()
            Me.Close()
            Exit Sub
        ElseIf My.Settings.SplashScreenEnabled = "True" Then
            SplashScreenForTabs.Show()
            Me.Close()
            Exit Sub
        End If
    End Sub

    Private Sub StartUpChooser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If My.Settings.TabsEnabledDefault = "Without Tabs" Then
            If My.Settings.SplashScreenEnabled = "False" Then
                BrowserWithoutTabs1.Show()
                Me.Close()
                Exit Sub
            ElseIf My.Settings.SplashScreenEnabled = "True" Then
                SplashScreen.Show()
                Me.Close()
                Exit Sub
            End If
        End If

        If My.Settings.TabsEnabledDefault = "With Tabs" Then
            If My.Settings.SplashScreenEnabled = "False" Then
                BrowserWithoutTabs.Show()
                Me.Close()
                Exit Sub
            ElseIf My.Settings.SplashScreenEnabled = "True" Then
                SplashScreenForTabs.Show()
                Me.Close()
                Exit Sub
            End If
        End If
    End Sub
End Class